﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Microsoft.SharePoint;


namespace SPMigrationOracleUtility
{
    public partial class Form1 : Form
    {
       
        public Form1()
        {
            InitializeComponent();
        }

        private void btnCancel_Click(object sender, EventArgs e)
        {
            Application.Exit();  
        }

        private void btnLogin_Click(object sender, EventArgs e)
        {
            try
            {
               // MessageBox.Show("Please wait accessing site "); 
                HelperClass help = new HelperClass(txtUname.Text, txtPwd.Text);
               
                if (help.CheckUserExist())
                {
                   
                    Menu objmnu = new Menu(txtUname.Text);
                    objmnu.Show();
                    this.Close();
                }
                else
                {
                    lblerror.Text = "Invalid Login Credentials";
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
    }
}
